#ifndef EDITOROBJECTCOLLECTOR_H
#define EDITOROBJECTCOLLECTOR_H
#include "StompedReality/Core/FileSystem.h"
#include "StomperLib/Objects/EditorObjectInfo.h"
#include <string>
namespace StomperLib {
struct FileInfoObjectTuple
{
  StompedReality::Utility::FileInfo fileInfo;
  StomperLib::EditorObjectInfo* object;
};
class EditorObjectCollector
{
 private:

  void ParseJson( Json::Value dataNodes, std::shared_ptr<std::vector<FileInfoObjectTuple> > resList,
                  StompedReality::Utility::FileInfo fileInfo );

 public:

  EditorObjectCollector( );

  virtual ~EditorObjectCollector( );

  virtual std::string GetHeader( )
  {
    return "";
  }

  virtual std::function<bool(std::string)> GetFilter( )
  {
    return [&] ( std::string &file )->bool { return true; };
  }

  virtual Json::Value GetContentNode( JsonPTR jsonPtr )
  {
    return *jsonPtr;
  }

  virtual std::shared_ptr<std::vector<FileInfoObjectTuple> > CollectObjects(
    StompedReality::Utility::FileSystem* fileSystem );

};

}
#endif // ifndef EDITOROBJECTCOLLECTOR_H